﻿@model VolunteerWebsite.Models.RegisterModel

@{
    ViewBag.Title = "注册";
}

<h2>注册</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true, "Account creation was unsuccessful. Please correct the errors and try again.")
    <div>
        <fieldset>
            <legend>账户信息</legend>

            <!-- 用户名(学号)-->
            <div class="editor-label">
                @Html.LabelFor(m => m.UserName)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.UserName)
                @Html.ValidationMessageFor(m => m.UserName)
            </div>

            <!-- 邮箱地址 -->
            <div class="editor-label">
                @Html.LabelFor(m => m.Email)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.Email)
                @Html.ValidationMessageFor(m => m.Email)
            </div>

            <!-- 密码-->
            <div class="editor-label">
                @Html.LabelFor(m => m.Password)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.Password)
                @Html.ValidationMessageFor(m => m.Password)
            </div>

            <!-- 确认密码-->
            <div class="editor-label">
                @Html.LabelFor(m => m.ConfirmPassword)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.ConfirmPassword)
                @Html.ValidationMessageFor(m => m.ConfirmPassword)
            </div>

        </fieldset>

        <fieldset>
            <legend>用户信息</legend>

            <!-- 姓名-->
            <div class="editor-label">
                @Html.LabelFor(m => m.Name)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.Name)
                @Html.ValidationMessageFor(m => m.Name)
            </div>

            <!-- 性别-->
            <div class="editor-label">
                @Html.LabelFor(m => m.Gender)
            </div>
            <div class="editor-field">
                @Html.RadioButtonFor(m => m.Gender,true)男
                @Html.RadioButtonFor(m => m.Gender,false)女
            </div>

            <!-- 年级-->
            <div class="editor-label">
                @Html.LabelFor(m => m.Grade)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.Grade)
                @Html.ValidationMessageFor(m => m.Grade)
            </div>

            <!-- 学院-->
            <div class="editor-label">
                @Html.LabelFor(m => m.School)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.School)
                @Html.ValidationMessageFor(m => m.School)
            </div>

            <!-- 手机-->
            <div class="editor-label">
                @Html.LabelFor(m => m.PhoneNumber)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.PhoneNumber)
                @Html.ValidationMessageFor(m => m.PhoneNumber)
            </div>

            <!-- 身份证-->
            <div class="editor-label">
                @Html.LabelFor(m => m.IdentityNumber)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.IdentityNumber)
                @Html.ValidationMessageFor(m => m.IdentityNumber)
            </div>

            <!-- 校内住址-->
            <div class="editor-label">
                @Html.LabelFor(m => m.LivingAddress)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.LivingAddress)
                @Html.ValidationMessageFor(m => m.LivingAddress)
            </div>

            <!-- 验证问题-->
            <div class="editor-label">
                @Html.LabelFor(m => m.SecurityQuestion)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.SecurityQuestion, "")
                @Html.ValidationMessageFor(m => m.SecurityQuestion)
            </div>

            <!-- 验证答案-->
            <div class="editor-label">
                @Html.LabelFor(m => m.SecurityAnswer)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.SecurityAnswer)
                @Html.ValidationMessageFor(m => m.SecurityAnswer)
            </div>
            <p>
                <input type="submit" value="确认注册" />
            </p>
        </fieldset>
    </div>
}
